﻿using System;
using System.Collections.Generic;

/// <summary>
/// CommParam 的摘要说明
/// </summary>
public class CommParam
{
    static CommParam()
    {
        //
        // TODO: 在此处添加构造函数逻辑
        //
    }

    private static DateTime starttime;
    private static DateTime stoptime;
    private static string productTypeID;
    private static string timeMonth;

    public static DateTime Starttime { get { return starttime; } set { starttime = value; } }
    public static DateTime Stoptime { get { return stoptime; } set { stoptime = value; } }
    public static string ProductTypeID { get { return productTypeID; } set { productTypeID = value; } }
    public static string TimeMonth { get { return timeMonth; } set { timeMonth = value; } }
}


//在这里配置白晚班时间 
public static class DayandNightShift
{
    public static IList<Step> list = new List<Step>()
    {
        new Step("白班：07:30~20:30"," 07:30, 20:30"),
        new Step("白班：08:00~20:00"," 08:00, 20:00"),
        new Step("白班：08:00~20:30"," 08:00, 20:30"),
        new Step("晚班：20:30~07:30"," 20:30, 07:30"),
        new Step("晚班：20:30~08:00"," 20:30, 08:00")
    };
}


//在这里配置时效箱编号
public static class DeviceNo
{
    public static IList<Step> list = new List<Step>()
    {
        new Step("时效箱001","时效箱001"),
        new Step("时效箱002","时效箱002"),
        new Step("时效箱003","时效箱003"),
        new Step("时效箱004","时效箱004"),
        new Step("时效箱005","时效箱005"),
        new Step("时效箱006","时效箱006"),
        new Step("时效箱007","时效箱007"),
        new Step("时效箱008","时效箱008"),
        new Step("时效箱009","时效箱009"),
        new Step("时效箱010","时效箱010"),
        new Step("时效箱011","时效箱011"),
        new Step("时效箱012","时效箱012"),
        new Step("时效箱013","时效箱013"),
        new Step("时效箱014","时效箱014"),
        new Step("时效箱015","时效箱015"),
        new Step("时效箱016","时效箱016"),
        new Step("时效箱017","时效箱017"),
        new Step("时效箱018","时效箱018"),
        new Step("时效箱019","时效箱019"),
        new Step("时效箱020","时效箱020"),
        new Step("时效箱021","时效箱021"),
        new Step("时效箱022","时效箱022"),
        new Step("时效箱023","时效箱023"),
        new Step("时效箱024","时效箱024"),
        new Step("时效箱025","时效箱025"),
        new Step("时效箱026","时效箱026"),
        new Step("时效箱027","时效箱027"),
        new Step("时效箱028","时效箱028"),
        new Step("时效箱029","时效箱029"),
        new Step("时效箱030","时效箱030"),
        new Step("时效箱031","时效箱031"),
        new Step("时效箱032","时效箱032"),
        new Step("时效箱033","时效箱033"),
        new Step("时效箱034","时效箱034"),
        new Step("时效箱035","时效箱035"),
        new Step("时效箱036","时效箱036"),
        new Step("时效箱037","时效箱037"),
        new Step("时效箱038","时效箱038"),
        new Step("时效箱039","时效箱039"),
        new Step("时效箱040","时效箱040"),
        new Step("时效箱041","时效箱041"),
        new Step("时效箱042","时效箱042"),
        new Step("时效箱043","时效箱043"),
        new Step("时效箱044","时效箱044"),
        new Step("时效箱045","时效箱045"),
        new Step("时效箱046","时效箱046"),
        new Step("时效箱047","时效箱047"),
        new Step("时效箱048","时效箱048"),
        new Step("时效箱049","时效箱049"),
        new Step("时效箱050","时效箱050"),

        new Step("时效箱061","时效箱061"),
        new Step("时效箱062","时效箱062"),
        new Step("时效箱063","时效箱063"),
        new Step("时效箱064","时效箱064"),
        new Step("时效箱065","时效箱065"),
        new Step("时效箱066","时效箱066"),
        new Step("时效箱067","时效箱067"),
        new Step("时效箱068","时效箱068"),
        new Step("时效箱069","时效箱069"),
        new Step("时效箱070","时效箱070")
    };
}
//deviceno


public static class FlowStep
{
    public static IList<Step> list = new List<Step>()
    {
       new Step("物料装配","AssembleStep"),
       new Step("腔内焊点检验","JointingStep"),
       new Step("时效","AgingStep"),
       new Step("调试电性能测试","DebugATEStep"),
       new Step("调试_初调","DebugStep"),
       new Step("QC定点焊点检验","QCFixedStep"),
       new Step("交调","PIMStep"),
       new Step("大功率测试","PowerStep"),
       new Step("调试有源电性能测试","DebugActiveATEStep"),
       new Step("电压检测","VoltageCheckStep"),
       new Step("灵敏度测试","SensitivityStep"),
       new Step("电性能测试","ATEStep"),
       new Step("有源电性能测试","ActiveATEStep"),
       new Step("OIP3测试","OIP3Step"),
       new Step("高频电性能测试","HFATEStep"),
       new Step("气密测试","AirtightnessStep"),  
       new Step("二次交调测试","PIMSecondStep"),  
       new Step("包装前外观检验","PackCheckStep"),
       new Step("噪声测试","NFCheck"),
       new Step("EPROM检测","EPROMCheck"),
       new Step("VSWR检测","VSWRCheck"),
       new Step("终检","FinalCheck"),
    };
}

//public static class RepairPath
//{
//    public static IList<Step> list = new List<Step>()
//    {
//       new Step("腔内焊点检验返修","腔内焊点检验返修"),
//       new Step("调试电性能测试返修","调试电性能测试返修"),
//       new Step("QC定点焊点检验返修","QC定点焊点检验返修"),
//       new Step("交调测试返修","交调测试返修"),
//       new Step("大功率测试吹气返修","大功率测试吹气返修"),
//       new Step("大功率测试拆盖返修","大功率测试拆盖返修"),
//       new Step("电性能测试返修","电性能测试返修"),
//       new Step("高频电性能测试不拆盖返修","高频电性能测试不拆盖返修"),
//       new Step("高频电性能测试拆盖返修","高频电性能测试拆盖返修"),
//       new Step("气密测试不拆调谐盖板返修","气密测试不拆调谐盖板返修"),
//       new Step("气密测试拆调谐盖板返修","气密测试拆调谐盖板返修"),
//       new Step("外观检验拆调谐盖板返修","外观检验拆调谐盖板返修"),
//       new Step("外观检验不拆盖板影响产品性能返修","外观检验不拆盖板影响产品性能返修"),
//       new Step("外观检验拆密封盖板返修","外观检验拆密封盖板返修"),  
//       new Step("外观检验不拆盖板不影响产品性能返修","外观检验不拆盖板不影响产品性能返修"),  
//    };
//}

public class Step
{
    public Step(string steptext, string stepvalue)
    {
        this.StepText = steptext;
        this.StepValue = stepvalue;
    }

    public string StepText { get; set; }
    public string StepValue { get; set; }
}

public static class RFSourceStep
{
    public static IList<Step> list = new List<Step>()
    {
        new Step("无",null),
        new Step("噪声测试","噪声测试"),
        new Step("EPROM检测","EPROM检测"),
        new Step("VSWR检测","VSWR检测"),
        new Step("终检","终检")
    };
}

public static class ATEUser_DepartmentList
{
    public static IList<Step> list = new List<Step>()
    {
        new Step("中试","中试"),
        new Step("中兴","中兴"),
        new Step("诺西","诺西"),
        new Step("综合组","综合组"),
        new Step("阿朗","阿朗"),
        new Step("西安产线","西安产线"),
        new Step("西安中试","西安中试")
    };
}

public static class ATEUser_PostTypeList_ForQual
{
    public static IList<Step> list = new List<Step>()
    {
        new Step("调试","调试"),
        new Step("测试","测试")
    };
}

public static class ATEUser_PostTypeList_ForMan
{
    public static IList<Step> list = new List<Step>()
    {
        new Step("装配","装配"),
        new Step("时效","时效"),
        new Step("调试","调试"),
        new Step("测试","测试"),
        new Step("包装","包装")
    };
}


/*统一用Step类
public class DTBetween
{
    public DTBetween(string dttext, string dtvalue)
    {
        this.DTText = dttext;
        this.DTValue = dtvalue;
    }

    public string DTText { get; set; }
    public string DTValue { get; set; }
}
*/

//public static class ClientSoftList
//{
//    public static IList<Step> list = new List<Step>()
//    {
//        new Step("ATE","ATE"),
//        new Step("HFATE","HFATE"),
//        new Step("PIM","PIM"),
//        new Step("TuningTest","TuningTest"),
//        new Step("DTE","DTE"),
//        new Step("PowerTest","PowerTest"),
//        new Step("PowerTestOSC","PowerTestOSC"),
//        new Step("AirtightnessTest","AirtightnessTest"),
//        new Step("PIMandPowerTest_ManualAdd","PIMandPowerTest_ManualAdd"),
//        new Step("装箱工序防错客户端","装箱工序防错客户端"),
//        new Step("紫光提供交调软件客户端","紫光提供交调软件客户端"),
//        new Step("广东信测功率测试软件","广东信测功率测试软件"),
//        new Step("装箱前关键工序检查软件","装箱前关键工序检查软件"),
//        new Step("模块化矢网ATE","模块化矢网ATE")
//    };
//}



/* 系统中Seesion的使用记录：
 * 1.Assemble_AssembleDetailAdd中的amddt;
 * 2.Assemble_AssembleStepAdd中的amsdt;
 * 3.PCBA_PCBAssemble_PCBAssembleAdd中的pamdt;
 * 4.PCBA_PCBAUnion_PCBAUnionAdd中的pamdt1;
 * 5.PCBA_PCBAVTest_PCBAVTestAdd中的pvtdt;
          
 * ***************以上类型为DataTable，用ViewState替换后，没有再使用了***************
 
 */



public static class IPGet
{
    public static string getIp()
    {
        if (System.Web.HttpContext.Current.Request.ServerVariables["HTTP_VIA"] != null)
            return System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].Split(new char[] { ',' })[0];
        else
            return System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString();
    }
}





